package com.lagou.service;

import com.lagou.bean.Classe;
import com.lagou.dao.ClassDao;
import com.lagou.factory.ClassDaoFactory;

import java.util.List;

public class ClassService {
    private ClassDao classDao;

    public ClassService() {
        this.classDao = ClassDaoFactory.getClassDao();
    }

    //获取班级信息
    public List<Classe> claQurService() {
        return classDao.getCla();
    }

    //添加班级信息
    public boolean addStd(Classe classe){
        return classDao.addCla(classe);
    }


    //更新班级信息
    public boolean updateStd(Classe classe){
        return  classDao.updateCla(classe);
    }

    //删除班级信息
    public boolean delCla(Classe classe){
        return classDao.delCla(classe);
    }

    //根据班级查询是否存在学生学生
    public boolean isExsistStd(String classNo){
        return classDao.isExsistStd(classNo);
    }

}
